package com.myspace_1.myproject_1;

public class A {
    Integer k;
    B b;

    public A(Integer k, B b) {
        this.k = k;
        this.b = b;
    }

    public A() {
    }

    public Integer getK() {
        return k;
    }

    public void setK(Integer k) {
        this.k = k;
    }

    public B getB() {
        return b;
    }

    public void setB(B b) {
        this.b = b;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        A a = (A) o;

        if (!k.equals(a.k)) return false;
        return b.equals(a.b);
    }

    @Override
    public int hashCode() {
        int result = k.hashCode();
        result = 31 * result + b.hashCode();
        return result;
    }
}
